import request from '/@/utils/request'
import {prefix} from '/@/api/oa'


export function getCodeURL() {
	return request({
		url: prefix + '/course/getCodeURL',
		method: 'get'
	})
}

export function getAccessToken(code) {
	return request({
		url: prefix + '/course/getAccessToken/'+code,
		method: 'get'
	})
}

export function refreshAccessToken() {
	return request({
		url: prefix + '/course/refreshAccessToken',
		method: 'get'
	})
}

export function getQuota() {
	return request({
		url: prefix + '/course/getQuota',
		method: 'get'
	})
}

export function getVideoFileList(data) {
	return request({
		url: prefix + '/course/getVideoFileList',
		method: 'post',
		data
	})
}

export function getAdToken(data) {
	return request({
		url: prefix + '/course/getAdToken',
		method: 'post',
		data
	})
}

export function getM3U8(data) {
	return request({
		url: prefix + '/course/getM3U8',
		method: 'post',
		data
	})
}
